<template>
    <uni-popup ref="popup" background-color="#fff">
        <view class="share-btn" style="display: flex;
		justify-content: space-evenly;
		padding: 20px;">
            <view class="item" @click="wxShare('WXSceneSession')" style="text-align: center;">
                <uni-icons custom-prefix="iconfont" color="#28C445" type="icon-weixin" size="30"></uni-icons>
                <view class="title" style="margin-top: 10px;">微信好友</view>
            </view>
            <view class="item" @click="wxShare('WXSceneTimeline')" style="text-align: center;">
                <uni-icons custom-prefix="iconfont" color="#28C445" type="icon-iconfontzhizuobiaozhunbduan36"
                           size="30"></uni-icons>
                <view class="title" style="margin-top: 10px;">微信朋友圈</view>
            </view>
        </view>
    </uni-popup>
</template>

<script>
export default {
    name: "Share",
    data: function () {
        return {
            Config: this.$Config,
            Common: this.$Common,
            Auth: this.$Auth,
            ShareUtil: this.$ShareUtil,
            State: this.$store.state,

            shareObject: {}
        }
    },
    methods: {
        show: function (shareObject) {
            this.shareObject = shareObject
            this.$refs.popup.open("bottom")
        },
        wxShare: function (scene) {
            let shareObject = Object.assign({}, this.shareObject)
            shareObject['scene'] = scene
            this.ShareUtil.share(shareObject)
        }
    }
}
</script>

<style lang="scss" scoped>
</style>